import {defineStore} from "pinia";
import {ref} from "vue";

export const useInfoStore = defineStore('token', () => {
  const userInfo = ref()
  const token = ref();

  // 添加一些方法来更新 token 和 userInfo
  function setUserInfo (info:any) {
    userInfo.value = info;
  }

  function setToken (newToken:any)  {
    token.value = newToken;
  }

  return {userInfo,token,setUserInfo,setToken}
})
